← Hub
9618 CompSci Hub
Ready
These notes are AI-assisted study material. Always cross-check against the official 9618 syllabus or your teacher before relying on them in an exam.

9618 Paper 1 — AS Theory

Cambridge International AS & A Level Computer Science 9618 (2026 and 2027–2029 syllabuses)
Authors: Yuchen Wang, Sushil Lamba
Paper 1 — 1h 30m — 75 marks Sections 1-8 (theory) Multiple-choice + structured

1Data Representation

How numbers, characters, images and sound are stored as binary; conversion between bases; representation of negative numbers and fractions.

1.1 Number systems

Computers store all data as binary (base 2). Humans group binary into hexadecimal (base 16) because each hex digit maps to exactly 4 bits, making long binary strings readable.

DecimalBinaryHex
0-90000-10010-9
101010A
151111F
2551111 1111FF
To convert binary → hex: group from the right in 4s, look each up. To convert hex → binary: replace each digit with its 4-bit pattern.

Binary Prefixes

Binary prefixes use powers of 1024 (210): kibi (KiB) = 1024, mebi (MiB) = 10242, gibi (GiB) = 10243, tebi (TiB) = 10244. Decimal prefixes use powers of 1000: kilo = 103, mega = 106, giga = 109, tera = 1012.

Hexadecimal Usage

  • Memory dump — display raw memory contents compactly
  • Program error codes — hex error codes in crash reports
  • Unicode character tables — code points written in hex

Overflow

Overflow: occurs when a calculation result exceeds the fixed bit storage limit. For example, adding 1 to 127 in 8-bit two's complement wraps to −128.

1.2 Binary Coded Decimal (BCD)

Each decimal digit (0-9) is encoded in 4 bits independently. The number 47 in BCD is 0100 0111, not 00101111. Used where decimal accuracy matters (calculators, currency).

BCD Advantages: Easy denary conversion; no decimal calculation error for finance applications. Use case: calculator digital displays.

1.3 Negative numbers — two's complement

The most significant bit becomes the sign bit with a negative place value. In 8-bit two's complement the range is −128 to +127.

Two's complement of N
flip all bits, then add 1
Example: -5 in 8 bits
+5 = 0000 0101 → flip → 1111 1010 → +1 → 1111 1011

1.4 Characters — ASCII and Unicode

ASCIIUnicode
7/8 bits (128/256 characters)16/24/32 bits (millions of characters)
English alphabet onlyAll world scripts
Small filesLarger files
No multi-language supportSuperset of ASCII, backward compatible
Extended ASCII (8 bits, 256 chars) is unstandardised — different systems map different characters to positions 128-255.

1.5 Images and sound

Bitmap Image

Bitmap images store a colour value for every pixel.

Bitmap file size
size = width × height × colour depth (bits)
ParameterEffect
Higher bit depthLarger file size, richer & more realistic colours
Higher resolutionLarger file size, sharper image, less pixelation
Key terms: Pixel = smallest display unit; File header = metadata (file type, resolution, bit depth, compression); Image resolution = total pixels (width × height); Screen resolution = max pixels of monitor; Bit depth = bits per pixel, determines total colours.

Vector Graphic

Vector images store geometric coordinates, drawing commands, and object properties (colour/line width). Advantages: resize without pixelation, smaller file size. Disadvantages: poor compression, unsuitable for photos. For logos & line art only.

Bitmap vs Vector: Bitmap stores every pixel (pixelates when zoomed, fits photos). Vector stores math formulas (lossless zoom, fits icons).

Digital Sound

Sound is captured by sampling amplitude at regular intervals.

Sound file size
size = sample rate × sample resolution × duration × channels
ParameterEffect
Higher sampling rateLarger file, smaller quantisation error, closer to original sound
Higher bit depthLarger file, wider dynamic range, more accurate amplitude recording
Key terms: Sampling = measure wave amplitude at fixed intervals; Sampling rate = samples per second; Sampling resolution (bit depth) = bits per sample; Analogue = continuous wave signal; Digital = discrete binary data.

1.6 Compression

Compression Purpose

Reduce file size, speed up transmission, and save storage space.

Lossless Compression

The original file can be restored completely. It only removes redundant data, so it is suitable for text and executable files. Examples include RLE and FLAC.

Lossy Compression

Unnoticeable details are discarded to achieve a higher compression ratio. It is suitable for audio, images, and video. Examples include MP3 and JPEG.

Run-Length Encoding (RLE)

Consecutive identical data is encoded as a repeat count plus a value. Its weak point is that files without repeated data can become larger.

Compression Methods for Different Files

  • Text: use lossless compression such as RLE; lossy compression is forbidden because data loss corrupts files.
  • Bitmap: use RLE for lossless compression; reduce resolution, bit depth, or colour palette for lossy compression.
  • Audio: use RLE or record amplitude differences for lossless compression; reduce sampling rate/bit depth or remove inaudible frequencies for lossy compression.

2Communication & Networks

LAN & WAN, network models, topologies, cloud computing, transmission media, hardware, and Internet protocols.

2.1 LAN & WAN

LANWAN
Small geographic rangeCross-region coverage
Private self-owned cables & hardwareRelies on public operator infrastructure

2.2 Network Models

Client-Server

Central server provides resources, clients send access requests. Advantages: centralised security & backup, uniform resource management. Examples: web server, print server, file server.

Peer-to-Peer (P2P)

All devices equal, data stored separately on each device. Disadvantages: no unified security/backup, virus spread easily, offline devices lose shared data.

Thin Client vs Thick Client

Thin ClientThick Client
Server completes all computation & storageLocal device handles most computation
Client only sends requests & displays resultsServer only offers auxiliary functions
Highly dependent on networkCan work offline

2.3 Transmission mode & direction

  • Serial: one bit at a time over one wire. Reliable over long distances. (USB, Ethernet)
  • Parallel: multiple bits simultaneously over multiple wires. Fast over short distances; suffers from skew over long ones.
  • Simplex: one direction only (TV broadcast).
  • Half-duplex: both directions, not simultaneously (walkie-talkie).
  • Full-duplex: both directions simultaneously (phone call).

2.4 Network topologies

TopologyProsCons
BusCheap, simpleSingle cable fault paralyses whole network
StarSingle device fault isolated, easy maintenance & expansionCentral switch is a single point of failure
MeshHighly resilient (multiple paths)Expensive, complex routing
HybridCombines multiple topology typesNeeds dedicated connecting hardware

2.5 Cloud Computing

Public CloudPrivate Cloud
Third-party service over public internetDedicated internal network for single organisation
Open to all authorised usersFull user control

Pros: Access anywhere with internet, provider handles backup & maintenance. Cons: Inaccessible without network, data security relies on third party.

2.6 Transmission Media

MediumAdvantagesDisadvantages
Copper (Twisted Pair)Low cost, easy installationElectromagnetic interference, short distance
Fibre OpticHigh bandwidth, anti-interference, hard to tapHigh cost, easy damage from sharp bending
Wireless (WiFi/Microwave/Satellite)Mobile device support, no wiringSignal attenuation, easy interception & interference

2.7 LAN Hardware

DeviceFunction
NIC/WNICUnique MAC address, send/receive wired/wireless data
SwitchForward data packets to target device by MAC address
WAPConvert wired network to WiFi for wireless device access
RepeaterRecover attenuated digital signals for long-distance transmission
BridgeConnect two LANs with identical communication protocols

2.8 Router

Core Functions: Connect different networks (LAN to WAN); Forward packets based on destination IP; Maintain routing table; Assign private IP addresses to internal devices.

2.9 Ethernet & CSMA/CD

Working Flow: Device listens to channel before sending → sends data only when idle → collision triggers a jam signal → devices wait a random time to resend.

Defect: More devices = more collisions & longer waiting time, poor scalability.

2.10 Bit Streaming

  • Real-time Streaming (Live): Capture & broadcast instantly, cannot pause/rewind.
  • On-demand Streaming: Pre-stored media on server, support pause, fast-forward, rewatch.
  • Buffer Function: Cache preloaded data to avoid stuttering under low broadband speed.

2.11 Internet vs WWW

InternetWWW
Global interconnected network systemCollection of web pages on internet
Based on TCP/IPUses HTTP/HTML
Underlying hardware infrastructureAccessed via browsers

2.12 IP Address

  • IPv4: 4 groups of 0-255 digits split by dots (32 bits).
  • IPv6: 8 groups of 4-hex digits, double colon :: replace consecutive zero groups (128 bits).
  • Public IP: Unique globally, accessible over internet.
  • Private IP: Only accessible within local LAN, need NAT to access internet. Reserved segments: 10.0.0.0, 172.16.0.0-172.31.0.0, 192.168.0.0.
  • Static IP: Fixed address, used for web servers (no DNS update required).
  • Dynamic IP: Reassigned each time device reconnects.
Subnetting: Split large network into small subnets; reduces congestion, provides segmented security, easier maintenance. Subnet mask distinguishes network ID & host ID.

2.13 DNS (Domain Name Service)

Workflow: Browser sends domain request to DNS server → DNS matches the domain to its IP and caches the result → returns the IP to the browser.

2.14 Protocols

  • HTTP / HTTPS: web pages. HTTPS adds TLS encryption.
  • FTP: file transfer.
  • SMTP / POP3 / IMAP: email send / receive.

3Computer Hardware

Storage types, peripherals, embedded systems, logic gates, and monitoring/control systems.

3.1 Primary vs Secondary Storage

Primary (RAM)Secondary (HDD/SSD/USB)
Temporary storage for running programsPermanent storage for file saving, backup & data transfer
Volatile (lose data without power)Non-volatile (retain data)

3.2 RAM vs ROM

RAMROM
Read & writeRead-only
VolatileNon-volatile
Store running softwareStore boot BIOS firmware

3.3 SRAM vs DRAM

SRAMDRAM
Flip-flop storage, no refresh neededCapacitor charge storage, regular refresh required
Fast, high costLow cost, large capacity
Used for CPU cacheMain memory

3.4 ROM Types

TypeFeature
PROMOne-time programmable
EPROMErase via UV light, need disassembly
EEPROMElectric erase on-device, support partial rewrite, firmware update support

3.5 Secondary & off-line storage

MediumHow it storesExamples
MagneticMagnetised regions on a spinning platterHDD, magnetic tape
OpticalPits and lands read by a laserCD, DVD, Blu-ray
Solid-stateFloating-gate transistorsSSD, USB drive, SD card

3.6 Embedded System

Embedded System: microcontroller built into large equipment for single fixed task. Defects: hard to upgrade firmware, difficult repair, often replaced instead of fixed. Example: washing machine control chip.

3.7 Peripheral Working Principles

DeviceHow it works
Laser PrinterLaser forms electrostatic image on photosensitive drum, toner adheres to charged area, transfer & fuse toner onto paper
3D PrinterAdditive manufacturing, print layer by layer based on CAD model, temperature sensor prevents overheat
MicrophoneSound wave vibrates diaphragm, convert mechanical vibration to electrical signal
SpeakerConvert electrical audio signal to vibration to generate sound wave
HDDRotating magnetic platters, read/write head record magnetic signals; low cost, large capacity
SSDNAND flash memory, no moving parts; fast read/write, shock resistant, quiet
Touchscreen (Resistive)Two conductive layers contact under pressure to calculate coordinate
Touchscreen (Capacitive)Human finger absorbs electric charge, corner sensors locate touch point

3.8 Buffer

Buffer: temporary storage for data between devices with different speed. Uses interrupt to notify data read/write. Scenarios: printer, video streaming, keyboard.

3.9 Logic Gates

GateSymbol notationOutput is 1 when…
ANDA · Bboth inputs are 1
ORA + Bat least one input is 1
NOTA′input is 0
NAND(A · B)′NOT both inputs are 1
NOR(A + B)'both inputs are 0
XORA ⊕ Binputs differ
A truth table with n inputs has 2n rows. Always write input combinations in binary-counting order.

3.10 Monitoring & Control Systems

Monitoring SystemControl System
Only collect sensor dataIncludes sensors + actuators + feedback
No automatic mechanical actionAuto-adjusts parameters

Sensor Types: temperature, pressure, infrared, sound, light, accelerometer. Actuator: converts electrical signal to mechanical movement. Feedback Function: output result adjusts input value, keeps system within set range.

4Processor Fundamentals

Von Neumann architecture, CPU components, registers, the fetch-execute cycle, interrupts, assembly language, and bit manipulation.

4.1 Von Neumann Architecture

Stored Program Concept: instructions & data stored in the same main memory. This is the foundation of virtually all modern computers.

4.2 CPU Components

  • ALU — Arithmetic Logic Unit. Performs arithmetic and bitwise operations.
  • CU — Control Unit. Decodes instructions and orchestrates the other components.
  • System Clock — unified timing signal for all operations.
  • IAS — fast immediate access main memory.

Registers

RegisterFull NamePurpose
PCProgram CounterAddress of next instruction to fetch
MARMemory Address RegisterMemory address for read/write
MDRMemory Data RegisterData transferred between CPU & memory
CIRCurrent Instruction RegisterStore executing instruction
ACCAccumulatorStore arithmetic operation values
Status RegStatus RegisterOperation flags (overflow, zero result etc.)

4.3 System Buses

BusDirectionCarries
Address BusUnidirectionalMemory/IO address
Data BusBidirectionalData content
Control BusBidirectionalRead/write, interrupt timing signals

4.4 CPU Performance Factors

  • Core Count: multi-core support parallel processing; limitation: software single-thread, memory bottleneck restrict speedup.
  • Bus Width: wider bus = more bits transferred per clock cycle.
  • Clock Speed: more instructions executed per second, limited by heat dissipation.
  • Cache Size: larger cache stores more frequent data, reduce RAM access delay.

4.5 The fetch-execute cycle

  1. Fetch: MAR ← PC; PC ← PC + 1; MDR ← [MAR]; CIR ← MDR.
  2. Decode: CU interprets the opcode in CIR.
  3. Execute: the operation is carried out; result may go to ACC or back to memory.

4.6 Interrupts

An interrupt is a signal that pauses normal CPU execution so a higher-priority task can be handled.

Handling: save state on stack — run ISR (interrupt service routine) — restore state — resume.

Sources: hardware fault, IO request, program runtime error, time slice end.

4.7 Assembly Language

Two-Pass Assembler

First Pass: scan code, build symbol table for labels & memory addresses. Second Pass: replace symbolic labels with absolute memory addresses, generate machine code.

Addressing Modes

ModeOperand means…
ImmediateThe actual value (e.g. LDM #5)
DirectThe address that holds the value (LDD 100)
IndirectThe address that holds the address (LDI 100)
IndexedAddress = base + index register (LDX 100)
RelativeOffset from current instruction address, supports relocatable code

Instruction Categories: data movement, IO, arithmetic, conditional/unconditional jump, comparison.

4.8 Bit Manipulation

Shift Operations

  • Logical Shift: fill empty bits with 0.
  • Arithmetic Right Shift: preserve sign bit for negative two's complement numbers.
  • Cyclic Shift: bits overflow one end enter the other side.

Bitwise Operators

  • AND: mask specific bits (judge odd/even, clear bits).
  • OR: set target bits to 1.
  • XOR: flip target bits.

5System Software

The operating system, utility programs, program libraries, DLLs, translators, and IDEs.

5.1 Operating-system functions

  • Memory management: virtual memory, paging, memory isolation protection.
  • File management: directory structure, file allocation, access permission control.
  • Peripheral management: load device driver, handle buffer & interrupts.
  • Process management: multitask scheduling, resource conflict resolution.
  • Security management: user account, password, backup, access authority.
  • User interface (GUI / CLI).

5.2 Utility programs

UtilityFunction
Disk FormatterPartition disk, create file system, mark bad sectors
Virus CheckerScan, quarantine, delete malicious programs, update virus database
DefragmenterRearrange split file fragments, reduce hard disk seek time
Disk RepairRecover corrupted data, mark unusable bad sectors
Compression ToolShrink file size
Backup ToolCreate recoverable file copies
FirewallBlock unauthorised external network access

5.3 Program Library & DLL

Library: precompiled reusable functions, save development time, fully tested.

DLL (Dynamic Link Library): shared library loaded only when needed at runtime. Multiple programs share one DLL; update DLL no need to recompile main program. Defect: program fails if DLL file missing.

5.4 Translators

TypeBehaviourUse
CompilerTranslates the whole program once — executable. Fast at runtime; source code hidden.Production builds.
InterpreterTranslates and runs line-by-line. Real-time error report; slower execution.Scripting, interactive use.
AssemblerTranslates assembly → machine code.Low-level programming.
Java Hybrid Translation: Source code → bytecode (compiler) → interpreted by the JVM. Cross-platform: the same bytecode runs on any system with a JVM.

5.5 IDE Functions

FeatureDescription
CodeAuto-complete, context prompt
Error DetectionReal-time syntax highlighting
PresentationCode fold, auto indent, color coding
DebugBreakpoint, single step run, variable watch window

6Security, Privacy & Data Integrity

Core definitions, threats, defences, encryption, digital signatures, and data verification techniques.

6.1 Core Definitions

ConceptDefinition
SecurityPrevent data loss, damage & unauthorised access
PrivacyRestrict personal sensitive data from irrelevant viewers
IntegrityGuarantee data accurate, complete & uncorrupted

6.2 Common Security Defences

  • Authentication: username + password, biometrics, digital signature.
  • Firewall: filter inbound/outbound packets by pre-set rules.
  • Anti-virus/Anti-spyware: scan & remove malicious software.
  • Encryption: convert plaintext to ciphertext, unreadable without decryption key.

Digital Signature Flow

  1. Hash file — message digest
  2. Encrypt digest with sender's private key — signature
  3. Receiver decrypts with sender's public key — expected digest
  4. Receiver hashes message themselves and compares

6.3 Network Security Threats

ThreatDescription
VirusSelf-replicating program, damages local data
SpywareSteals keyboard input data & transmits to third party
HackerUnauthorised remote access to devices
PhishingFake email/website tricks users into submitting private info
PharmingMalware redirects users to fake counterfeit websites

6.4 Data Loss Prevention

Regular backup, disk mirroring (two identical storage disks), UPS uninterruptible power supply.

6.5 Data Validation vs Verification

Validation (Check input reasonableness)Verification (Check no error in input/transmission)
Presence check: field cannot be blankDouble data entry, manual visual comparison
Range check: numeric value within fixed intervalParity check (byte/block): add parity bit to fix 1 count
Format/length check: match specified character ruleChecksum: calculate total of transmitted data, compare at receiver
Check digit: weighted sum modulo operation verify digit correctness
Parity check defect: even number of bit errors undetectable.

7Ethics & Ownership

Professional ethics, software licences, and AI applications & impacts.

7.1 Computing Professional Ethical Code (BCS/IEEE)

Eight Principles: Prioritise public interest; Serve client & employer fairly; Ensure high-quality product; Independent objective judgment; Standardised team management; Fair to colleagues; Continuous self-learning & professional promotion.

7.2 Software Licence Types

TypeFeature
Open SourceFull source code provided, user modify & redistribute freely
SharewareFree trial period, full function unlock after payment, source code hidden
Commercial SoftwarePaid authorisation, no source code, official technical support
FreewareZero cost use, forbid modification & reverse engineering
  • Copyright — automatic legal protection of original works; covers expression, not ideas.
  • Patent — granted for novel inventions; lasts ~20 years; must be applied for.
  • Free software (FSF definition) — the four freedoms: use, study, share, modify.
Don't confuse "free as in beer" (no cost) with "free as in speech" (libre / open). Software can be either, both, or neither.

7.3 AI Applications & Impacts

Applications: face recognition, self-driving car, speech assistant, game AI, license plate recognition.

Social Impact: privacy risk from biometric data collection; reduce manual labour positions.

Economic Impact: cut labour cost for enterprises, extra expense on AI hardware & maintenance.

8Databases

Flat file limitations, relational model, normalisation, DBMS functions, and SQL basics.

8.1 Limitation of Flat File System

  • Severe data redundancy & duplicate storage
  • Data inconsistency (duplicated records update separately)
  • Program-data dependency (modify data structure requires rewrite all related programs)
  • Complex query hard to implement
  • Difficult fine-grained access permission control

8.2 Relational Database Terminology

  • Entity — a thing the database stores (Student, Book).
  • Table — two-dimensional data set; Tuple = row (record); Attribute = column (field).
  • Primary Key — uniquely identifies a row.
  • Candidate Key — field qualified to be primary key.
  • Foreign Key — match primary key of another table, build table relationship.
  • Referential Integrity: foreign key must map existing primary key; support cascade update & cascade delete.
  • Index: sorted pointer table, speed up search query.

8.3 Normalisation

FormRule
1NFAll fields atomic, no repeated group in one record.
2NFEliminate partial dependency on composite primary key.
3NFEliminate transitive dependency between non-key fields.

8.4 DBMS Core Functions

  • Data Dictionary: metadata storing table, field, data type, constraint & relationship.
  • Three Schema Layers: External (user view), Conceptual (global model), Physical (disk storage structure).
  • Database Security: user account, access permission, data encryption, operation log, scheduled backup.

8.5 SQL — DDL & DML basics

-- DDL
CREATE TABLE Student (
  StudentID INTEGER PRIMARY KEY,
  Name      VARCHAR(50) NOT NULL,
  ClassID   INTEGER,
  FOREIGN KEY (ClassID) REFERENCES Class(ClassID)
);
ALTER TABLE Student ADD Email VARCHAR(100);

-- DML Query
SELECT Name FROM Student WHERE ClassID = 1 ORDER BY Name;
SELECT ClassID, COUNT(*) AS NumStudents FROM Student GROUP BY ClassID;
SELECT S.Name, C.ClassName FROM Student S INNER JOIN Class C ON S.ClassID = C.ClassID;

-- DML Modify
INSERT INTO Student VALUES (42, 'Lin', 1);
UPDATE Student SET ClassID = 2 WHERE StudentID = 42;
DELETE FROM Student WHERE StudentID = 42;